;; -*- mode: emacs-lisp; coding: gbk-dos -*-

; setting the PC keyboard's various keys to Super or Hyper
; presumes you are using the emacsw32 distro on windows
; http://ourcomments.org/Emacs/EmacsW32Util.html
(setq w32-alt-is-meta t
      w32-pass-alt-to-system nil
      w32-pass-lwindow-to-system nil 
      w32-pass-rwindow-to-system nil 
      w32-pass-apps-to-system nil 
      w32-lwindow-modifier 'super ;; Left Windows key 
      w32-rwindow-modifier 'hyper ;; Right Windows key 
      w32-apps-modifier 'hyper) ;; Menu key

;; use caps-lock as M-x, win32 version
(setq w32-enable-caps-lock nil)
(global-set-key [capslock] 'execute-extended-command)

;; use caps-lock as M-x, Linux version
(if (eq window-system 'x)
    (shell-command "xmodmap -e 'clear Lock' -e 'keycode 66 = F13'"))
(global-set-key [f13] 'execute-extended-command)

; various settings for the Mac keyboard
;(setq mac-option-modifier 'hyper) ; sets the Option key as Hyper
;(setq mac-option-modifier 'super) ; sets the Option key as Super
;(setq mac-command-modifier 'meta) ; sets the Command key as Meta
;(setq mac-control-modifier 'meta) ; sets the Control key as Meta
